package hn.cch.grammar.bootstrap;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

public class RuntimeDemo {

    private static final Logger logger = LoggerFactory.getLogger(RuntimeDemo.class);


    public static void main(String[] args) throws IOException {

        long maxMemory = Runtime.getRuntime().maxMemory() / 1000000;
        long totalMemory = Runtime.getRuntime().totalMemory() / 1000000;
        long freeMemory = Runtime.getRuntime().freeMemory() / 1000000;

        logger.info("maxMemory:{}MB,totalMemory:{}MB,freeMemory:{}MB", maxMemory, totalMemory, freeMemory);


    }
}
